//
//  UIToolbar+UIToolbarBackground.m
//  YanTaiBang
//
//  Created by broad zou on 12-9-5.
//  Copyright (c) 2012年 UEXSS. All rights reserved.
//

#import "UIToolbar+UIToolbarBackground.h"
#import "AppUtility.h"

@implementation UIToolbar (UIToolbarBackground)

- (void)drawRect:(CGRect)rect {  
	UIImage *image = [AppUtility getLocalImageWithCache:@"nav_bg"]; 
    float version = [[[UIDevice currentDevice] systemVersion] floatValue];
	if (version >= 5.0) {
		[self setBackgroundImage:image forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
	} else {
         //self.tintColor =[UIColor colorWithRed:250/255.0 green:130/255.0 blue:24/255.0 alpha:1];
		[image drawInRect:rect];  
	}
}  

@end
